var Buyer = require('../../models/buyer');
var User = require('../../models/User');
var _ = require('underscore');


Buyer.find().then(function (buyers) {
    _.each(buyers, function (buyer, index) {
        new User({
            user: buyer.account, //管理员账号
            password: buyer.password, //管理员密码
            name: buyer.buyer, //购买人
            phone: buyer.phoneNumber, //联系电话
            company: buyer.company //所属公司
        }).save();
    });
});